const Home = () => import('@/views/Home')
const Mall = () => import('@/views/Mall')
const Cart = () => import('@/views/Cart')
const Mine = () => import('@/views/Mine')
const Categories = () => import('@/views/Categories')
const Details = () => import('@/views/Details')
const Login = () => import('@/views/Login')

const routes = [
  {
    path: '/',
    redirect: 'home'
  },
  {
    path: '/home',
    name: 'home',
    title: '首页',
    isNav: true,
    icon: '&#xe6cb;',
    component: Home
  },
  {
    path: '/mall',
    name: 'mall',
    title: '分类',
    isNav: true,
    icon: '&#xe67b;',
    component: Mall
  },
  {
    path: '/cart',
    name: 'cart',
    title: '购物车',
    isNav: true,
    icon: '&#xe6d5;',
    component: Cart
  },
  {
    path: '/mine',
    name: 'mine',
    title: '个人',
    isNav: true,
    icon: '&#xe657;',
    component: Mine
  },
  {
    path: '/login',
    name: 'login',
    title: '登录',
    component: Login
  },
  {
    path: '/details/:id',
    name: 'details',
    title: '细节',
    props: true,
    component: Details
  },
  {
    path: '/cates/:id',
    name: 'cates',
    title: '列表',
    props: true,
    component: Categories
  }
]

export default routes
